﻿using EstimateLib;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestProject1
{
    
    
    /// <summary>
    ///这是 DomainNameLengthTest 的测试类，旨在
    ///包含所有 DomainNameLengthTest 单元测试
    ///</summary>
    [TestClass()]
    public class DomainNameLengthTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///获取或设置测试上下文，上下文提供
        ///有关当前测试运行及其功能的信息。
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region 附加测试特性
        // 
        //编写测试时，还可使用以下特性:
        //
        //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //使用 TestInitialize 在运行每个测试前先运行代码
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //使用 TestCleanup 在运行完每个测试后运行代码
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_LenLessThen_5()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 4; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.A; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);
            
        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_LenEqual_5()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 5; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.A; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);
            
        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_LenLessThen_10()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 8; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.B; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);
            
        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_Len_10()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 10; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.B; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);
            
        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_LenLessThen_15()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 12; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.C; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_Len_15()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 15; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.C; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_LenLessThen_20()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 17; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.D; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }
        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_Len_20()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 20; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.D; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_Len_21()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 21; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.E; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///CaculateDomainNameLengthLevel 的测试
        ///</summary>
        [TestMethod()]
        public void CaculateDomainNameLengthLevelTest_Len_BiggerThen_21()
        {
            DomainNameLength target = new DomainNameLength(); // TODO: 初始化为适当的值
            int domainNameLength = 37; // TODO: 初始化为适当的值
            DomainNameLengthLevel expected = DomainNameLengthLevel.E; // TODO: 初始化为适当的值
            DomainNameLengthLevel actual;
            actual = target.CaculateDomainNameLengthLevel(domainNameLength);
            Assert.AreEqual(expected, actual);

        }
    }
}
